package com.example.spring_aop.controller;

import com.example.spring_aop.aspect.MyAspect;
import com.example.spring_aop.service.UserService;
import org.aspectj.lang.annotation.Around;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: UserController
 * @author: 芃
 * @description:
 * @date: 2024/12/30 13:01
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    @MyAspect
    public Boolean login(String username, String password) {
        return userService.login(username, password);
    }


}
